package com.dandelion.business.entity.vo.user.req;

import com.dandelion.business.entity.vo.validationgroup.BaseInsert;
import com.dandelion.business.entity.vo.validationgroup.BaseUpdate;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

@Data
@ApiModel(value = "用户新增或修改请求实体")
public class UserReqVO {

    @Null(message = "id必须为空", groups = {BaseInsert.class})
    @NotNull(message = "id不能为空", groups = {BaseUpdate.class})
    @ApiModelProperty(value = "角色id,新增是为空,修改时必填")
    private Long id;

    @NotBlank(message = "用户名不能为空", groups = {BaseInsert.class})
    @ApiModelProperty("用户名")
    private String userName;

    @NotBlank(message = "密码不能为空", groups = {BaseInsert.class})
    @ApiModelProperty("密码")
    private String password;

    @NotNull(message = "账号状态不能为空", groups = {BaseInsert.class})
    @ApiModelProperty("账号状态（1正常 0停用）")
    private Integer state;

    @ApiModelProperty("昵称")
    private String nickName;


    @ApiModelProperty("邮箱")
    private String email;

    @ApiModelProperty("手机号")
    private String mobile;

    @ApiModelProperty("用户性别（1男，2女，0未知）")
    private Integer sex;

    @ApiModelProperty("头像")
    private String avatar;

}
